<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Order_time extends Model
{
    protected $table = "order_time";

    public function seltime($id)
    {
        $bo = $this->where('order_id',$id)->first();
        if($bo){
            return $bo;
        }else{
            return null;
        }
    }

    public function store_at($id)
    {
        $time = date('Y-m-d H:i:s',time());
        $bo = $this->where('order_id',$id)->update(['store_at'=>$time]);
        if($bo){
            return $bo;
        }else{
            return null;
        }
    }
}
